package com.levelup.cr.dao.impl;

import com.levelup.cr.dao.NodeWriter;
import com.levelup.cr.dao.fs.FSNodeSynchronizer;
import com.levelup.cr.model.Node;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * User: user
 * Date: 15.08.13
 * Time: 20:28
 * To change this template use File | Settings | File Templates.
 */
@Service("nodeWriter")
public class NodeWriterImpl implements NodeWriter {
    @Autowired
    private FSNodeSynchronizer fsNodeSynchronizer;

    public void setFsNodeSynchronizer(FSNodeSynchronizer fsNodeSynchronizer) {
        this.fsNodeSynchronizer = fsNodeSynchronizer;
    }

    @Override
    public void writeNode(Node node) {
        fsNodeSynchronizer.synchronizeNode(node);
    }

    @Override
    public void moveNode(Node current, Node destination) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
